<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
</script>
</head>
<body>

<div id="div" style="height:200px;width:200px;border-style:solid;display:none;"></div>
<script>
var div = document.getElementById("div");
var w = div.offsetWidth; 				// 返回0
var h = div.offsetHeight; 				// 返回0


alert(w);
</script>

</body>
</html> 
